package org.dong.samples.util;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;

import org.dong.samples.model.ExamTestType;
import org.dong.samples.model.vo.ExamTestVO;
import org.dong.samples.service.TestHibernateService;
import org.springframework.beans.factory.annotation.Autowired;

public class TestUtils {
	
	@Autowired
	TestHibernateService testHibernateService;
	
	public static boolean checkSubjectScoreAndCount(Integer totalTestCount, Integer totalTestScore,
			ExamTestType examTestType) {
		boolean flag = false;
		if(totalTestCount*examTestType.getTestTypeScore()==totalTestScore){
			return true;
		}
		return flag;
	}

	public static List<Integer> getRandomTestIdList(List<ExamTestVO> testList, Integer count) {
		Random rad = new Random(count);
		List<Integer> listInt = new ArrayList<Integer>();
		
		return null;
	}

	public static Map<Integer, Integer> getTestCountByScore(Integer totalTestCount,
			Map<Integer, Integer> testTypeScoreMap) {
		Map<Integer, Integer>  count = new HashMap<Integer, Integer>();
		for(Integer key:testTypeScoreMap.keySet()){
			if(testTypeScoreMap.get(key)*totalTestCount==100){
				
			}
		}
		return count;
	}
	
}
